Add regression tests for hooks, schedulers, and shared utilities#26
Draft
cursor[bot] wants to merge 4 commits into
Draft
Add regression tests for hooks, schedulers, and shared utilities#26cursor[bot] wants to merge 4 commits into
cursor[bot] wants to merge 4 commits into
Conversation
Cover FlowMatchEulerDiscreteScheduler, HeliosScheduler, and LTXEulerAncestralRFScheduler contract behavior, DDIM/DDPM set_timesteps validation guards, state_dict LoRA conversion paths, and remote_utils encode/decode helpers. Co-authored-by: Simon Lynch <srlynch1@users.noreply.github.com>
…g_utils Cover high-blast-radius code paths that previously only had indirect pipeline coverage: - CogVideoXDDIMScheduler SNR shift and set_timesteps guard - CogVideoXDPMScheduler multi-step API (old_pred_original_sample) - DDPMWuerstchenScheduler float timestep schedule and add_noise - loading_utils path/URL validation and submodule resolution Use python -m ruff in check_copies so the commit hook works when ruff is installed as a Python package but not on PATH. Co-authored-by: Simon Lynch <srlynch1@users.noreply.github.com>
- Unit-test FBC skip/recompute logic, tuple outputs, and threshold behavior - Cover AmusedScheduler Gumbel masking, 2D reshaping, and schedule validation Co-authored-by: Simon Lynch <srlynch1@users.noreply.github.com>
Compare observed and theoretical copied blocks after applying the same ruff formatting to each, avoiding false drift when only one side was previously stylified. Also fix multi-line overwrite and use python -m ruff. Co-authored-by: Simon Lynch <srlynch1@users.noreply.github.com>
305046c to
97cdb2f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Adds fast, deterministic regression tests for high-blast-radius code paths that previously had weak or no direct unit coverage.
Also fixes
utils/check_copies.pyso copy consistency checks stylify both observed and theoretical blocks before comparing (avoids false drift when only one side was ruff-formatted).Risky behavior now covered
set_timestepsguards, multi-step DPM APIadd_noiseTest files added/updated
tests/hooks/test_first_block_cache.py(new)tests/schedulers/test_scheduler_amused.py(new)tests/others/test_loading_utils.py(new)tests/others/test_remote_utils.py(new)tests/others/test_state_dict_utils.py(new)tests/schedulers/test_scheduler_cogvideox.py(new)tests/schedulers/test_scheduler_ddpm_wuerstchen.py(new)tests/schedulers/test_scheduler_flow_match_euler_discrete.py(new)tests/schedulers/test_scheduler_helios.py(new)tests/schedulers/test_scheduler_ltx_euler_ancestral_rf.py(new)tests/schedulers/test_scheduler_ddim.py,test_scheduler_ddpm.py(extended)utils/check_copies.py(comparison fix)Why these tests materially reduce regression risk
SchedulerCommonTest); masking schedule bugs would break Amused pipelines entirely.load_image,get_submodule_by_name, remote decode) sit on critical paths for pipeline I/O; bad path handling or state-dict parsing causes hard-to-debug load failures.Validation
90 tests passed locally.